home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 33
/
Volume 33 - JOGO DISK .iso
/
Games
/
shoot_em_in.swf
/
scripts
/
DefineSprite_136
/
frame_81
/
DoAction.as
Wrap
Text File
|
2007-01-15
|
821b
|
31 lines
function screenToWorld(px, py, pycamera, pfocale, pscale, pxoffset, pyoffset)
{
var lpoint = new Object();
lpoint.scale = (py - pyoffset) / pycamera;
lpoint.x = (px - pxoffset) / lpoint.scale;
lpoint.y = pycamera;
lpoint.z = pscale * pfocale / lpoint.scale - pfocale;
return lpoint;
}
function worldToScreen(px, py, pz, pfocale, pscale, pxoffset, pyoffset)
{
var lpoint = new Object();
var lScale = pscale * pfocale / (pfocale + pz);
lpoint.x = lScale * px + pxoffset;
lpoint.y = lScale * py + pyoffset;
lpoint.z = Math.abs(lScale) / 2;
return lpoint;
}
function vectorDiv()
{
vXVector /= vDivBut;
vYVector /= vDivBut;
vZVector /= vDivBut;
}
function vectorDivGoal()
{
vXVector /= vDivGoal;
vYVector /= vDivGoal;
vZVector /= vDivGoal;
}